package cc.wanforme.st.server.properties;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/** 跨域域名
 * @author wanne
 * @date 2022-10-20
 */
@Component
@ConfigurationProperties(prefix = "csrf-cors")
public class CsrfCorsProperty {
	private boolean enableOrigins;
	private boolean enableRefers;
	private boolean allowEmptyReferer;
	
	private String[] origins;
	
	private String[] refers;

	public boolean isEnableOrigins() {
		return enableOrigins;
	}

	public void setEnableOrigins(boolean enableOrigins) {
		this.enableOrigins = enableOrigins;
	}

	public boolean isEnableRefers() {
		return enableRefers;
	}

	public void setEnableRefers(boolean enableRefers) {
		this.enableRefers = enableRefers;
	}

	public String[] getOrigins() {
		return origins;
	}

	public void setOrigins(String[] origins) {
		this.origins = origins;
	}

	public String[] getRefers() {
		return refers;
	}

	public void setRefers(String[] refers) {
		this.refers = refers;
	}
	
	public boolean isAllowEmptyReferer() {
		return allowEmptyReferer;
	}
	
	public void setAllowEmptyReferer(boolean allowEmptyReferer) {
		this.allowEmptyReferer = allowEmptyReferer;
	}
}
